//
//  DeliveryAddressModel.m
//  xpkc
//
//  Created by 胡志飞 on 15/12/2.
//  Copyright © 2015年 TopSage. All rights reserved.
//

#import "DeliveryAddressModel.h"

@implementation DeliveryAddressModel

-(instancetype)initWithDict:(NSDictionary *)dict{
    
    if (self = [super init]) {
        
        [self setValuesForKeysWithDictionary:dict];
        
    }
    
    return self;
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
    if ([key isEqualToString:@"userid"]) {
        
        self.userid = [NSString stringWithFormat:@"%@",value]; //[value stringValue];
        
    }
    
    if ([key isEqualToString:@"id"]) {
        self.codeId = [NSString stringWithFormat:@"%@",value];//[value stringValue];
    }
    
    if ([key isEqualToString:@"isdel"]) {
        self.isdel = [NSString stringWithFormat:@"%@",value];//[value stringValue];
    }
    
    if ([key isEqualToString:@"isdefault"]) {
        self.isdefault = [NSString stringWithFormat:@"%@",value];//[value stringValue];
    }
    
}

+(DeliveryAddressModel *)deliveryAddressModelWithDict:(NSDictionary *)dict{
    
    return [[self alloc] initWithDict:dict];
    
}

@end
